#include "Runtime.h"

namespace ilrt{
/*

	void PropertyMap::set(BasicPointer key, BasicPointer value) {
		NodeType requested;
		requested.key(key);
		PropertyMapFunctions functions;
		IteratorType i(requested, *this, functions);
		if(i.current()) {
			i.current()->setup(key, value);
			return;
		}
		size_t allocatedSize;
		NodeType &node = runtime().types.PropertyMap.nodeAllocator_.create(sizeof(NodeType), allocatedSize);
		node.setup(key, value);
		add(node, functions);
	}
	BasicPointer PropertyMap::get(BasicPointer key){
		NodeType requested;
		requested.key(key);
		PropertyMapFunctions functions;
		IteratorType i(requested, *this, functions);
		if(!i.current()) return runtime().specials.Undefined;
		return i.current()->value();
	}
	BooleanType::PointerType PropertyMap::del(BasicPointer key){
		NodeType requested;
		requested.key(key);
		PropertyMapFunctions functions;
		IteratorType i(requested, *this, functions);
		if(!i.current()) return runtime().specials.False;
		remove(*i.current());
		return runtime().specials.False;
	}
	BooleanType::PointerType PropertyMap::has(StringType::PointerType key){
		Runtime & rt = runtime();
		if(get(key).isUndefined()) return rt.specials.False;
		return rt.specials.True;
	}*/
}
